var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
(function () {
    function Test1(aaa) {
        return function (target, key) {
            // target[key] = aaa
            if (target.aaa) {
                target.aaa.push(key);
            }
            else {
                target.aaa = [key];
            }
        };
    }
    function Test2(target, key) {
        console.log("target", target.username);
        if (target.aaa) {
            target.aaa.push(key);
        }
        else {
            target.aaa = [key];
        }
        // target[key] = "ncvksndfjkandjasda"
    }
    var Login = /** @class */ (function () {
        function Login(data) {
            this.username = data.username;
            this.password = data.password;
        }
        __decorate([
            Test1("sad")
        ], Login.prototype, "username", void 0);
        __decorate([
            Test2
        ], Login.prototype, "password", void 0);
        return Login;
    }());
    // let L = new Login({username:"1231"})
    // console.log("L", L)
    // console.log("L.aaa", L.aaa)
    // console.log("L.username", L.username) // sad
    // console.log("L.password", L.password) // ncvksndfjkandjasda
})();
